package com.smart.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 存储产品参数信息的表
 * @author zhangwei
 */
@ApiModel(value = "存储产品参数信息的表")
@Data
@TableName(value = "product_attr_value")
public class ProductAttrValue {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 关联产品id
     */
    @TableField(value = "product_id")
    @ApiModelProperty(value = "关联产品id")
    private Long productId;

    /**
     * 商品属性id
     */
    @TableField(value = "product_attr_id")
    @ApiModelProperty(value = "商品属性id")
    private Long productAttrId;

    /**
     * 手动添加规格或参数的值，参数单值，规格有多个时以逗号隔开
     */
    @TableField(value = "`value`")
    @ApiModelProperty(value = "手动添加规格或参数的值，参数单值，规格有多个时以逗号隔开")
    private String value;

    public static final String COL_ID = "id";

    public static final String COL_PRODUCT_ID = "product_id";

    public static final String COL_PRODUCT_ATTR_ID = "product_attr_id";

    public static final String COL_VALUE = "value";
}